<?php
if($users!=NULL){
foreach ($users as $row) {
    echo "<div class='user_div'>
                        <input type='hidden' name='support_user_id[{$row->id_from}]' id='support_user_id' value='{$row->id_from}'/>";
    if ($row->image_name_from != NULL)
        $image = "<img src='" . base_url() . "profile/image/thumb/{$row->id_from}/{$row->image_name_from}' alt='{$row->username_from}'>";
    else
        $image = "<img src='" . base_url() . "img/no_photo.gif' alt=''>";
    echo $image;
    echo "<div style='float: right;'><b>    
                        {$row->username_from}
                        [{$row->num_messages}]</b>        
                        <label>" . lang('last_message') . ": " . $row->last_message . "</label>
                        </div>
                     </div>";
}
}
?>
